package projectTurtle;
import com.toedter.calendar.*;
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;


public class JDCTest extends JFrame implements ActionListener
{
	JButton button;
	JDateChooser jdc;
	
	public JDCTest()
	{
		JPanel panel = new JPanel();
		button = new JButton("BUTTON");
		button.addActionListener(this);
		jdc = new JDateChooser();
		panel.add(jdc);
		panel.add(button);
		this.add(panel);
		this.setSize(600,400);
		this.setVisible(true);
	}
	
	public void actionPerformed(ActionEvent ae)
	{
		Object source = ae.getSource();
		if(source == button)
		{
			System.out.println(jdc.getDate());
		}
	}

	public static void main(String [] args)
	{
		new JDCTest();
	}
}
